﻿using System.Web.Mvc;

namespace WebUI.Areas.Bots
{
    public class BotsAreaRegistration : AreaRegistration
    {
        public override string AreaName
        {
            get
            {
                return "Bots";
            }
        }

        public override void RegisterArea(AreaRegistrationContext context)
        {
            context.MapRoute(
"RemoveUser",
"Bots/{controller}/{action}/{userName}",
null,
new { controller = MVC.Bots.UsersAndMachines.Name, action = MVC.Bots.UsersAndMachines.ActionNames.RemoveUser }
);

            context.MapRoute(
"RemoveMachine",
"Bots/{controller}/{action}/{machineName}",
null,
new { controller = MVC.Bots.UsersAndMachines.Name, action = MVC.Bots.UsersAndMachines.ActionNames.RemoveMachine }
);

            context.MapRoute("Navigation", "Bots/{controller}/{action}/{step}", new { step = (string)null }, new { step = @"^[a-zA-Z]+$" });
            context.MapRoute(
    "Details",
    "Bots/{controller}/{action}/{id}",
    new { id = @"\d+" }
);

            context.MapRoute("Bots_default", "Bots/{controller}/{action}");
        }
    }
}
